#!/usr/bin/python
# -*- coding: UTF-8 -*-

import os

frame_count = 793
camera1_frame_start = 79
camera2_frame_start = 56
camera3_frame_start = 1
pto_name = ' video1_out3/3.pto'

cmd1 = ''
cmd1 += pto_name
cmd2 = ''

# cmd1 = cmd1 + '%d.png %d.png %d.png' % (camera1_frame_start, camera2_frame_start, camera3_frame_start)

# print(cmd1)

# os.system(cmd1)

for i in range(1,frame_count + 1):
    cmd1 = 'nona -o out -m TIFF_m ' + pto_name + ' Record/videos_1/1/png/%d.png Record/videos_1/2/png/%d.png Record/videos_1/3/png/%d.png' % (camera1_frame_start, camera2_frame_start, camera3_frame_start)
    camera1_frame_start += 1
    camera2_frame_start += 1
    camera3_frame_start += 1
    cmd2 = 'enblend -o video1_out3/%d.tif out0000.tif out0001.tif out0002.tif' % (i)
    os.system(cmd1)
    os.system(cmd2)
    # print(i)
    # print(cmd1)
    # print(cmd2)

    # enblend -o finished.tif out0000.tif out0001.tif out0002.tif
    # cmd1 = "nona -o out -m TIFF_m 1.pto %d.png %d.png %d.png" % (camera1_frame_start, camera2_frame_start, camera3_frame_start)
    # print i
# os.system('ls')
# print(cmd1)
# print(cmd2)
